<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/business/supplier/template.xhtml">
   
   	<ui:define name="metadata">
	   	<f:metadata>
	   		<f:event listener="#{loginedServiceSupplierController.init()}" type="preRenderView"></f:event>
	   		<f:event listener="#{serviceSupplierHome.setInstance(loginedServiceSupplierController.serviceSupplier)}" type="preRenderView"></f:event>
	   	</f:metadata>
   	</ui:define>

	<ui:define name="supplier_content">
		<h:form id="queryForm">
		    
		    
		    <c:set var="_supplier" value="#{loginedServiceSupplierController.serviceSupplier}"/>
		    <p:tabView rendered="#{not empty loginedServiceSupplierController.serviceSupplier}">
		        <p:tab title="基本信息">
		        	
		        	<p:panelGrid columns="2" cellpadding="5" style="width: 100%">
						<p:outputLabel value="公司名称" />
						<h:outputText value="#{serviceSupplierHome.instance.cnname}" />		
												   
						<p:outputLabel value="单位性质或组织形式" />				
						<h:outputText id="companyType" 
									  value="#{serviceSupplierHome.instance.companyType}"/>
						
						<p:outputLabel value="统一社会信用代码" />
						<h:outputText id="creditCode" 
								   value="#{serviceSupplierHome.instance.creditCode}" />
						
						<p:outputLabel value="注册资金(万元)" />				
						<h:outputText id="registeredFund" 
								  value="#{serviceSupplierHome.instance.registeredFund}" />
						
						<p:outputLabel value="注册登记机关" />				
						<h:outputText id="registrationAuthority" 
								  value="#{serviceSupplierHome.instance.registrationAuthority}" />
						
						<p:outputLabel value="注册登记号" />				
						<h:outputText id="registrationNo" 
								  value="#{serviceSupplierHome.instance.registrationNo}" />
						
						<p:outputLabel value="成立时间" />		
						<h:outputText  id="regtime" 
									value="#{serviceSupplierHome.instance.regtime}">
							<f:convertDateTime pattern="yyyy-MM-dd"/>
						</h:outputText>
						
						<p:outputPanel>
							<p:outputLabel value="营业执照" /><br/>
							（扫描图片上传）
						</p:outputPanel>		
						<div id="imgsPreview" >
							<img  data-original="#{attachmentUtils.getFullPath(serviceSupplierHome.instance.businessLicenseImages[0])}" src="#{attachmentUtils.getFullPath(serviceSupplierHome.instance.businessLicenseImages[0])}"  id="img" width="240"/>
						</div>						
						
						<p:outputLabel value="办公地址" />				
						<h:outputText id="address" 
								  value="#{serviceSupplierHome.instance.address}" />
						
						<p:outputLabel value="法定代表人" />				
						<h:outputText id="legalPerson" 
								  value="#{serviceSupplierHome.instance.legalPerson}" />
						
						<p:outputLabel value="法定代表人联系电话" />				
						<h:outputText id="legalPersonPhoneNumber" 
								  value="#{serviceSupplierHome.instance.legalPersonPhoneNumber}" />
						
						<p:outputLabel value="第一联系人" />				
						<h:outputText id="firstContactor" 
								  value="#{serviceSupplierHome.instance.firstContactor}" />
						
						<p:outputLabel value="第一联系人电话" />				
						<h:outputText id="firstContactorPhoneNumber" 
								  value="#{serviceSupplierHome.instance.firstContactorPhoneNumber}" />
						
						<p:outputLabel value="第二联系人" />				
						<h:outputText id="secondContactor" 
								  value="#{serviceSupplierHome.instance.secondContactor}" />
						
						<p:outputLabel value="第二联系人电话" />				
						<h:outputText id="secondContactorPhoneNumber" 
								  value="#{serviceSupplierHome.instance.secondContactorPhoneNumber}" />
						
						<p:outputLabel value="员工数" />				
						<h:outputText id="employeeCount" 
								  value="#{serviceSupplierHome.instance.employeeCount}" />
						
						<p:outputLabel value="高级职称人数" />				
						<h:outputText id="highTitleEmployeeCount" 
								  value="#{serviceSupplierHome.instance.highTitleEmployeeCount}" />
						
						<p:outputLabel value="中级职称人数" />				
						<h:outputText id="mediumTitleEmployeeCount" 
								  value="#{serviceSupplierHome.instance.mediumTitleEmployeeCount}" />
						
						<p:outputLabel value="初级职称人数" />				
						<h:outputText id="beginnerTitleEmployeeCount" 
								  value="#{serviceSupplierHome.instance.beginnerTitleEmployeeCount}" />
							   
						<p:outputLabel value="是否政府服务供应商" />				
						<h:outputText id="govServiceSupplier" 
								   value="#{certHome.instance.serviceSupplier.govServiceSupplier ? '是' : '否'}" />
											   
						<p:outputLabel value="中介机构所在地区" />		
						<h:outputText id="region"
								   value="#{codeDicUtils.getCodeDicValueKeyMap('所在地区')[certHome.instance.serviceSupplier.region]}" />
						
						<p:outputLabel value="营业期限" />					
						<h:outputText id="businessAllotedTime"
								   value="#{serviceSupplierHome.instance.busnissAllotedTime}" 
								rendered="#{not serviceSupplierHome.instance.alwaysValid}">
							<f:convertDateTime pattern="yyyy-MM-dd"/>
						</h:outputText>
						
						<p:outputLabel value="是否长期有效" />	
						<h:outputText value="长期有效"
								   rendered="#{serviceSupplierHome.instance.alwaysValid}" />
						   <h:outputText value="否"
						   rendered="#{not serviceSupplierHome.instance.alwaysValid}" />

						
						<p:outputLabel for="intro" value="驳回原因" />	
						<h:outputText id="intro"
								   value="#{serviceSupplierHome.instance.intro}" />
						
						<p:column headerText="驳回时间">
							<h:outputText value="#{_cert.auditTime}" rendered="#{not empty _cert.auditResult and not _cert.auditResult}">
								<f:convertDateTime pattern="yyyy-MM-dd"/>
							</h:outputText>
            			</p:column>
            			<p:column headerText="驳回原因">
							<h:outputText value="#{_cert.currRejectRecord.reason}" rendered="#{not empty _cert.auditResult and not _cert.auditResult}" />
            			</p:column>
					</p:panelGrid>
		        	
		        </p:tab>
		     
		    </p:tabView>
		</h:form>
		
		
	</ui:define>
   
</ui:composition>